package com.wanlian.fileserver.Controller;

import com.wanlian.fileserver.Controller.vo.FileDeleteVo;
import com.wanlian.fileserver.Controller.vo.FileRenameVo;
import com.wanlian.fileserver.Device.worker.DeviceServerFileWorker;
import com.wanlian.json.JsonStringUtil;
import com.wanlian.netty.File.msg.util.FileDeleteMsg;
import com.wanlian.netty.File.msg.util.FileRenameMsg;

//文件操作接口
public class FileController {

    public String reanme(String data){
        FileRenameVo vo=JsonStringUtil.readValue(data, FileRenameVo.class);
        FileRenameMsg renameMsg=new FileRenameMsg();
        DeviceServerFileWorker.sendDataByKey("",renameMsg);
        return "";
    }
    public String delete(String data){
        FileDeleteVo vo=JsonStringUtil.readValue(data, FileDeleteVo.class);
        FileDeleteMsg deleteMsg=new FileDeleteMsg();
        DeviceServerFileWorker.sendDataByKey("",deleteMsg);
        return "";
    }

}
